This .zip file contains the replication codes for Eichenbaum, Godinho de Matos, Lima, Rebelo and Trabandt  (2023, Journal of Political Economy), 'Expectations, Infections, and Economic Activity'.


The folder <0_data> contains the codes for the empirical analysis of the paper. Inspect replication.pdf for more details. In case of questions, please reach out to Miguel Godinho de Matos (miguel.godinhomatos@gmail.com). 


The remaining folders pertain to the models. All codes were written and run with Matlab 2021a. The following toolboxes are required to run the codes: optimization toolbox, statistics toolbox, parallel computing toolbox.


The codes contain a lot of comments that describe in detail how the codes are set up, how switches need to be set to either estimate and/or simulate the model etc. Please read the comments carefully. In case of questions, please reach out to Mathias Trabandt (mathias.trabandt@gmail.com). 


The folder <1a_baseline> contains the code for the baseline estimated model. Inspect and run young_old.m.  Also inspect all other routines in the folder which are automatically called from young_old.m The subfolder <mcmc> contains the mcmc data.


The folder <1b_baseline_more_containment_10pp_reestimated> contains the code for the reestimated version of the model with 10 percent more containment. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  


The folder <1c_baseline_no_containment_reestimated> contains the code for the reestimated version of the model with no containment. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  
 

The folder <1d_baseline_no_containment> contains the code for the version of the model with no containment using the baseline estimated model parameters. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  
 

The folder <1e_baseline_perfect_foresight_all_waves> contains the code for the version of the model with perfect foresight for all waves. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  

  
The folder <1f_baseline_alpha_variant_50percent_more_infectious> contains the code for the version of the model in which the virus is 50 percent more infectious. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  


The folder <1g_baseline_containment_only> contains the code for the version of the model with containment only, i.e. no infections. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  

 
The folder <1h_baseline_constant_true_pid> contains the code for the version of the model in which the mortality and recovery rates are constant, i.e. not time-varying. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  


The folder <2a_baseline_w_12481> contains the code for the version of the model with mean income set to 12.481 EUR. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m. Also inspect and run plot_data_model_by_income_brackets.m


The folder <2b_baseline_w_28566> contains the code for the version of the model with mean income set to 28.566 EUR. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  


The folder <2c_baseline_w_59490> contains the code for the version of the model with mean income set to 59.490 EUR. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  


The folder <3a_fire_reestimated> contains the code for the reestimated version of the model with FIRE/No Learning. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m. The subfolder <mcmc> contains the mcmc data.


The folder <3b_fire_no_containment_reestimated> contains the code for the reestimated version of the model with FIRE/No Learning and no containment. Inspect young_old.m and all other routines for modifications relative to <1a_baseline>. Run young_old.m.  


The folder <4_endemic_covid> contains the code for the model with endemic covid. Inspect and run steady_state_oldyoung.m. 


The folder <5_stylizedEZexample> contains the code for the stylized model with Epstein-Zin preferences. Inspect and run EZstylized_final.m. 


Martin Eichenbaum, Miguel Godinho de Matos, Francisco Lima, Sergio Rebelo and Mathias Trabandt


September 2023

 


